import request from '@/utils/request'
//登录接口函数
export function login({ username, password }) {
  return request({
    url: `/ucenter/teacher/loginByNumber/${username}`,
    method: 'post',
    params: { username, password }
  })
}
//获得初始用户信息接口函数
export function getInfo(token) {
  return request({
    url: '/ucenter/teacher/getUserInfo',
    method: 'post',
    params: { token }
  })
}
//退出登录接口函数
export function logout() {
  return request({
    url: '/ucenter/teacher/loginOut',
    method: 'post'
  })
}
//获得teacherId
export function getTeacherId() {
  return request({
    url: '/ucenter/teacher/getTeacherId',
    method: 'get',
  })
}